package com.weifangfirecontrolformal.weifangfirecontrolformal.web.service.maintenancesystem.basisinfo;

import cn.hutool.json.JSONObject;
import com.weifangfirecontrolformal.weifangfirecontrolformal.common.base.BaseService;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.model.RespEntity;
import com.weifangfirecontrolformal.weifangfirecontrolformal.support.utils.requestutil.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Author: YangYu
 * @ClassName: FireControlComponentsService
 * @Date: Created in 10:10 2020/12/25
 * @Description: 消防部件服务
 */
@Service
@Slf4j
public class FireControlComponentsService extends BaseService {


    /**
     * @Author YangYu
     * @Description 消防部件分页列表
     * @Date Created in 10:39 2020/12/25
     * @Param [jsonParam]
     */

    public RespEntity fireControlComponentsPagList(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","fireControlComponentsPagList","fireControlComponents");
    }

    /**
     * @Author YangYu
     * @Description 消防部件新增
     * @Date Created in 10:42 2020/12/28
     * @Param [jsonParam]
     */

    public RespEntity add(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","add","fireControlComponents");
    }

    /**
     * @Author YangYu
     * @Description 消防部件更新
     * @Date Created in 10:43 2020/12/28
     * @Param [jsonParam]
     */

    public RespEntity update(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","update","fireControlComponents");
    }

    /**
     * @Author YangYu
     * @Description 消防部件详情
     * @Date Created in 10:46 2020/12/28
     * @Param [jsonParam]
     */

    public RespEntity detail(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","detail","fireControlComponents");
    }

    /**
     * @Author YangYu
     * @Description 消防部件删除
     * @Date Created in 11:22 2020/12/28
     * @Param [jsonParam]
     */

    public RespEntity delete(JSONObject jsonParam) {
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","delete","fireControlComponents");
    }

    /**
     * @Author YangYu
     * @Description 消防部件不分页列表
     * @Date Created in 10:19 2021/1/4
     * @Param [jsonParam]项目id
     */

    public RespEntity fireControlComponentsList(JSONObject jsonParam){
        //处理支持form-data和json两种方式
        jsonParam = HttpRequestUtil.commonHttpRequestParamConvert(getRequest());
        return restJava(jsonParam,"basisInfo","fireControlComponentsList","fireControlComponents");
    }
}
